package com.xingda.packing.dmss.enums;

import lombok.Getter;

public enum TaskLocation {
    N0(0, "未知"),
    N1(1, "抓取位"),
    N2(2, "抓取位-装箱位"),
    N3(3, "抓取位-缓存位"),
    N4(4, "缓存位-装箱位"),
    N5(5, "抓轮");

    TaskLocation(int typeId, String typeName) {
        this.typeId = typeId;
        this.typeName = typeName;
    }

    public static TaskLocation getByID(int typeId) {
        for (TaskLocation value : TaskLocation.values()) {
            if (value.getTypeId() == typeId) {
                return value;
            }
        }
        return N0;
    }

    @Getter
    private final int typeId;

    @Getter
    private final String typeName;
}
